package com.gulimall.common.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author ht
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BaseRunException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private String msg;
    private int code = 500;

    public BaseRunException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public BaseRunException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public BaseRunException(String msg, int code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public BaseRunException(String msg, int code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }
}

